<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

		<!-- Start  SelectRelatedItemsToPerimetre  -->
		<!-- ________________________ -->
		<!-- ________________________ -->
		<!-- ________________________ -->
		<!-- ________________________ -->
		<p:dialog id="selectRelatedItemsToPerimetreId"
			header="Related Items To Perimetre"
			modal="false" resizable="false"
			widgetVar="selectRelatedItemsToPerimetreWv" height="500" width="500">

			<h:form>
				<p:pickList id="selectedRelatedItemToPerimetrePickListId"
					style=".ui-picklist .ui-picklist-list {width: 260px;}"
					
					
					binding="#{activiteManagedBean.pickList}"
					var="relatedItemToPerimetre"
					itemLabel="#{relatedItemToPerimetre.name}"
					itemValue="#{relatedItemToPerimetre.name}" />
				<table class="nostyle">
					<tr>
						<td width="1"><p:commandButton
								id="saveRelatedItemsToPermietreSaveId" value="Enregistrer"
								oncomplete="selectRelatedItemsToPerimetreWv.hide()" 
								actionListener="#{activiteManagedBean.saveRelatedItemsToPerimetreId}"></p:commandButton></td>
						<td width="232"><p:commandButton
								id="saveRelatedItemsToPermietreCanselId" value="Annuler"
								oncomplete="selectRelatedItemsToPerimetreWv.hide()"></p:commandButton></td>
					</tr>
				</table>

			</h:form>
		</p:dialog>

		<!-- End  Select List Magasin    -->
		<!-- ________________________ -->
		<!-- ________________________ -->
		<!-- ________________________ -->
		<!-- ________________________ -->





	<h:form id="addTacheFormId">
		<table width="505" border="1" align="center">
			<tr>
				<td width="495">
					<h1>Activite</h1>
					<h2 class="tit">Creation d'une tache</h2>


					<h5>Nom de la tache :</h5> <p:inputText
						value="#{activiteManagedBean.toBeAddedOrdEditedTask.taskName}" />

					<h5>Etiquette :</h5> <p:inputText
						value="#{activiteManagedBean.toBeAddedOrdEditedTask.etiquette}" />

					<h5>Numero :</h5> <p:inputText
						value="#{activiteManagedBean.toBeAddedOrdEditedTask.numero}" />

					<h5>Couleur :</h5> <p:colorPicker widgetVar="colorPickerWv" id="colorPickerId"
						value="#{activiteManagedBean.toBeAddedOrdEditedTask.couleur}" />
					<h5>Type de planification :</h5> <p:selectOneRadio
						styleClass="nostyle" id="optionsplan"
						value="#{activiteManagedBean.selectedPlannificationTypeString}">
						<p:ajax event="change"
							listener="#{activiteManagedBean.onSelectPlannificationType}"
							update="automaticPlannifPanelId,checkListPlannifPanelId" />
						<f:selectItem itemLabel="Manuelle" itemValue="1" />
						<f:selectItem itemLabel="Automatique" itemValue="2" />
						<f:selectItem itemLabel="Check-List" itemValue="3" />
					</p:selectOneRadio>


				</td>
			</tr>
			<tr>
				<td><ui:include src="automaticPlannification.xhtml" /> <ui:include
						src="checkListPlannification.xhtml" /></td>
			</tr>
			<tr>
				<td height="157">

					<h5>Périmètre :</h5> <p:selectOneMenu
						value="#{activiteManagedBean.valeurperim}" style="width:200px">
						<f:selectItem itemLabel="Magasins" itemValue="1" />
						<f:selectItem itemLabel="Secteur" itemValue="2" />
						<f:selectItem itemLabel="Rayons" itemValue="3" />
						<f:selectItem itemLabel="Famille" itemValue="4" />
						<f:selectItem itemLabel="Salariés" itemValue="5" />
						<p:ajax event="change"
							listener="#{activiteManagedBean.onListPerimetre}"
							update="selectRelatedItemsToPerimetreButtonId" />
					</p:selectOneMenu> <br></br>
				<p:commandButton id="selectRelatedItemsToPerimetreButtonId"
						visible="#{activiteManagedBean.commandButtonSelectRelatedItem}" update=":selectRelatedItemsToPerimetreId"
						value="#{activiteManagedBean.commandButtonSelectRelatedItemValue}" actionListener="#{activiteManagedBean.onClickButtonShowListRelatedPerimetre}"
						oncomplete="selectRelatedItemsToPerimetreWv.show()" />


					<table class="nostyle">
						<tr>
							<td width="1"><p:commandButton id="saveTaskbuttonId"
									value="Enregistrer" oncomplete="addTacheWv.hide()"
									actionListener="#{activiteManagedBean.addTache}" update=":activiteFormId:tacheDataListId" ></p:commandButton></td>
							<td width="232"><p:commandButton id="cancelSaveTackId"
									value="Annuler" oncomplete="addTacheWv.hide()"></p:commandButton></td>
						</tr>
					</table>

				</td>
			</tr>
		</table>
	</h:form>

</ui:composition>